package com.tianquan.test.redisAop;/**
 * @author starsea
 * @date 2024-10-08 上午10:31
 */

import com.tianquan.miracle.annotation.Component;

/**
 *@BelongsProject: uploaddemo
 *@BelongsPackage: com.tianquan.miracledemo.test
 *@Author: tianquan
 *@CreateTime: 2024-10-08  10:31
 *@Description: 测试
 *@Version: 1.0
 */

@Component
public class UserServiceImpl {

    @Cache(prefix = "user",key = "#user.id")
    public User selectUser(User user) {
        System.out.println("addUser");
        return user;
    }

    @Cache(prefix = "user",key = "#userId")
    public void deleteUser(Long userId) {
        System.out.println("deleteUser");
    }

}
